import { encode64 } from './core'
import http from './http'

export async function getList(dir: string = '') {
    let url = '/api/file/list'
    if (dir) {
        const dirBase64 = encode64(dir)
        url = `${url}/${dirBase64}`
    } 

  const r = await  http.get(url)
  return r.data  
}